import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui'
import VueRouter from 'vue-router'
import routes from './routers'
import 'element-ui/lib/theme-chalk/index.css'
import 'element-ui/lib/theme-chalk/display.css'
import './assets/style.css'
import fHeader from './components/f-header'
import fFooter from './components/f-footer'
import i18n from './i18n/i18n'
import axios from './axios'
import highlight from 'highlight.js';

Vue.config.productionTip = false
Vue.use(highlight);
Vue.use(ElementUI)
Vue.use(VueRouter)
Vue.component("f-header",fHeader)
Vue.component("f-footer",fFooter)	

//Vue.use(ElementUI, {
//i18n: (key, value) => i18n.t(key, value)
//})
Vue.prototype.$axios = axios
const router =new VueRouter({
	routes,
	mode: 'history'
})
//将代码高亮封装成一个指令
Vue.directive('highlight', (el) => {
	let blocks = el.querySelectorAll('pre code')
	blocks.forEach((block) => {
	highlight.highlightBlock(block)
  
	})
  
  })
new Vue({
	router,
	i18n,
	render: h => h(App),
}).$mount('#app')
